#!/usr/bin/env python
#-*- coding:utf-8 -*-
# author:Vergil
# datetime:2019/2/20 17:34
# software: PyCharm
from django import forms
from .models import MusicComment, PostComment


class MusicCommentForm(forms.ModelForm):
    user = forms.CharField(label='用户', max_length=128, required=False, widget=forms.HiddenInput)
    music = forms.CharField(label='音乐', max_length=128, required=False, widget=forms.HiddenInput)
    content = forms.CharField(label='评论内容', widget=forms.Textarea(attrs={'class': 'form-control', 'rows': '5'}))

    class Meta:
        model = MusicComment
        fields = ('content',)


class PostCommentForm(forms.ModelForm):
    user = forms.CharField(label='用户', max_length=128, required=False, widget=forms.HiddenInput)
    post = forms.CharField(label='主题', max_length=128, required=False, widget=forms.HiddenInput)
    content = forms.CharField(label='评论内容', widget=forms.Textarea(attrs={'class': 'form-control', 'rows': '5'}))

    class Meta:
        model = PostComment
        fields = ('content',)